package com.itheima.advantagesup.controller;

import com.itheima.advantagesup.common.PageBean;
import com.itheima.advantagesup.common.R;
import com.itheima.advantagesup.dto.UserPageDTO;
import com.itheima.advantagesup.service.YddUserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.xml.transform.Result;

/**
 * @ClassName: YddUserController
 * @description:
 * @author: zhao qianfeng
 * @date: 2023年07月31日
 * @version: 1.0
 */
@RestController
@RequestMapping("/ydd_user")
@Slf4j
public class YddUserController {
    @Autowired
    private YddUserService yddUserService;
    /**
     * 分页
     */
    @GetMapping("/list")
    public R<PageBean> page(UserPageDTO userPageDTO){
        PageBean pageBean = yddUserService.pageList(userPageDTO);
        return R.success(pageBean);
    }
}
